{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport Menu from '../menu';\nimport { cloneElement } from '../_util/reactNode';\nimport warning from '../_util/warning';\nimport BreadcrumbItem from './BreadcrumbItem';\nimport BreadcrumbSeparator from './BreadcrumbSeparator';\nimport useStyle from './style';\nfunction getBreadcrumbName(route, params) {\n  if (!route.breadcrumbName) {\n    return null;\n  }\n  const paramsKeys = Object.keys(params).join('|');\n  const name = route.breadcrumbName.replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);\n  return name;\n}\nfunction defaultItemRender(route, params, routes, paths) {\n  const isLastItem = routes.indexOf(route) === routes.length - 1;\n  const name = getBreadcrumbName(route, params);\n  return isLastItem ? /*#__PURE__*/React.createElement(\"span\", null, name) : /*#__PURE__*/React.createElement(\"a\", {\n    href: `#/${paths.join('/')}`\n  }, name);\n}\nconst getPath = (path, params) => {\n  path = (path || '').replace(/^\\//, '');\n  Object.keys(params).forEach(key => {\n    path = path.replace(`:${key}`, params[key]);\n  });\n  return path;\n};\nconst addChildPath = (paths, childPath, params) => {\n  const originalPaths = _toConsumableArray(paths);\n  const path = getPath(childPath || '', params);\n  if (path) {\n    originalPaths.push(path);\n  }\n  return originalPaths;\n};\nconst Breadcrumb = _a => {\n  var {\n      prefixCls: customizePrefixCls,\n      separator = '/',\n      style,\n      className,\n      routes,\n      children,\n      itemRender = defaultItemRender,\n      params = {}\n    } = _a,\n    restProps = __rest(_a, [\"prefixCls\", \"separator\", \"style\", \"className\", \"routes\", \"children\", \"itemRender\", \"params\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  let crumbs;\n  const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  if (routes && routes.length > 0) {\n    // generated by route\n    const paths = [];\n    crumbs = routes.map(route => {\n      const path = getPath(route.path, params);\n      if (path) {\n        paths.push(path);\n      }\n      // generated overlay by route.children\n      let overlay;\n      if (route.children && route.children.length) {\n        overlay = /*#__PURE__*/React.createElement(Menu, {\n          items: route.children.map(child => ({\n            key: child.path || child.breadcrumbName,\n            label: itemRender(child, params, routes, addChildPath(paths, child.path, params))\n          }))\n        });\n      }\n      const itemProps = {\n        separator\n      };\n      if (overlay) {\n        itemProps.overlay = overlay;\n      }\n      return /*#__PURE__*/React.createElement(BreadcrumbItem, Object.assign({}, itemProps, {\n        key: path || route.breadcrumbName\n      }), itemRender(route, params, routes, paths));\n    });\n  } else if (children) {\n    crumbs = toArray(children).map((element, index) => {\n      if (!element) {\n        return element;\n      }\n      process.env.NODE_ENV !== \"production\" ? warning(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', \"Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children\") : void 0;\n      return cloneElement(element, {\n        separator,\n        key: index\n      });\n    });\n  }\n  const breadcrumbClassName = classNames(prefixCls, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  return wrapSSR( /*#__PURE__*/React.createElement(\"nav\", Object.assign({\n    className: breadcrumbClassName,\n    style: style\n  }, restProps), /*#__PURE__*/React.createElement(\"ol\", null, crumbs)));\n};\nBreadcrumb.Item = BreadcrumbItem;\nBreadcrumb.Separator = BreadcrumbSeparator;\nexport default Breadcrumb;","map":{"version":3,"names":["_toConsumableArray","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","classNames","toArray","React","ConfigContext","Menu","cloneElement","warning","BreadcrumbItem","BreadcrumbSeparator","useStyle","getBreadcrumbName","route","params","breadcrumbName","paramsKeys","keys","join","name","replace","RegExp","replacement","key","defaultItemRender","routes","paths","isLastItem","createElement","href","getPath","path","forEach","addChildPath","childPath","originalPaths","push","Breadcrumb","_a","prefixCls","customizePrefixCls","separator","style","className","children","itemRender","restProps","getPrefixCls","direction","useContext","crumbs","wrapSSR","hashId","map","overlay","items","child","label","itemProps","assign","element","index","process","env","NODE_ENV","type","__ANT_BREADCRUMB_ITEM","__ANT_BREADCRUMB_SEPARATOR","breadcrumbClassName","Item","Separator"],"sources":["/data/messenger.client/node_modules/antd/es/breadcrumb/Breadcrumb.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport Menu from '../menu';\nimport { cloneElement } from '../_util/reactNode';\nimport warning from '../_util/warning';\nimport BreadcrumbItem from './BreadcrumbItem';\nimport BreadcrumbSeparator from './BreadcrumbSeparator';\nimport useStyle from './style';\nfunction getBreadcrumbName(route, params) {\n  if (!route.breadcrumbName) {\n    return null;\n  }\n  const paramsKeys = Object.keys(params).join('|');\n  const name = route.breadcrumbName.replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);\n  return name;\n}\nfunction defaultItemRender(route, params, routes, paths) {\n  const isLastItem = routes.indexOf(route) === routes.length - 1;\n  const name = getBreadcrumbName(route, params);\n  return isLastItem ? /*#__PURE__*/React.createElement(\"span\", null, name) : /*#__PURE__*/React.createElement(\"a\", {\n    href: `#/${paths.join('/')}`\n  }, name);\n}\nconst getPath = (path, params) => {\n  path = (path || '').replace(/^\\//, '');\n  Object.keys(params).forEach(key => {\n    path = path.replace(`:${key}`, params[key]);\n  });\n  return path;\n};\nconst addChildPath = (paths, childPath, params) => {\n  const originalPaths = _toConsumableArray(paths);\n  const path = getPath(childPath || '', params);\n  if (path) {\n    originalPaths.push(path);\n  }\n  return originalPaths;\n};\nconst Breadcrumb = _a => {\n  var {\n      prefixCls: customizePrefixCls,\n      separator = '/',\n      style,\n      className,\n      routes,\n      children,\n      itemRender = defaultItemRender,\n      params = {}\n    } = _a,\n    restProps = __rest(_a, [\"prefixCls\", \"separator\", \"style\", \"className\", \"routes\", \"children\", \"itemRender\", \"params\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  let crumbs;\n  const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  if (routes && routes.length > 0) {\n    // generated by route\n    const paths = [];\n    crumbs = routes.map(route => {\n      const path = getPath(route.path, params);\n      if (path) {\n        paths.push(path);\n      }\n      // generated overlay by route.children\n      let overlay;\n      if (route.children && route.children.length) {\n        overlay = /*#__PURE__*/React.createElement(Menu, {\n          items: route.children.map(child => ({\n            key: child.path || child.breadcrumbName,\n            label: itemRender(child, params, routes, addChildPath(paths, child.path, params))\n          }))\n        });\n      }\n      const itemProps = {\n        separator\n      };\n      if (overlay) {\n        itemProps.overlay = overlay;\n      }\n      return /*#__PURE__*/React.createElement(BreadcrumbItem, Object.assign({}, itemProps, {\n        key: path || route.breadcrumbName\n      }), itemRender(route, params, routes, paths));\n    });\n  } else if (children) {\n    crumbs = toArray(children).map((element, index) => {\n      if (!element) {\n        return element;\n      }\n      process.env.NODE_ENV !== \"production\" ? warning(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', \"Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children\") : void 0;\n      return cloneElement(element, {\n        separator,\n        key: index\n      });\n    });\n  }\n  const breadcrumbClassName = classNames(prefixCls, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  return wrapSSR( /*#__PURE__*/React.createElement(\"nav\", Object.assign({\n    className: breadcrumbClassName,\n    style: style\n  }, restProps), /*#__PURE__*/React.createElement(\"ol\", null, crumbs)));\n};\nBreadcrumb.Item = BreadcrumbItem;\nBreadcrumb.Separator = BreadcrumbSeparator;\nexport default Breadcrumb;"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,IAAIC,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAA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